﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace _3D
{
    public partial class FormName : Form
    {
        public FormName()
        {
            InitializeComponent();
            if (FormMain.PlayerName != "")
            {
                txtName.Text = FormMain.PlayerName;
            }
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            if (txtName.Text != "")
            {
                FormMain.PlayerName = txtName.Text;
                this.Dispose();
            }
            else
            {
                MessageBox.Show("Please enter the name!");
            }
        }
    }
}
